package info.rflow.actions;

import info.rflow.model.RBlock;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.util.Collection;


/**
 * Document me!
 *
 * @author Holger Brandl
 */
public class ResetBlockAction extends AbstractAction {

    private Collection<RBlock> selectedBlocks;


    public ResetBlockAction(Collection<RBlock> selectedBlocks) {
        this.selectedBlocks = selectedBlocks;

        putValue(NAME, "Reset Block");
//        putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_F, KeyEvent.ALT_MASK));
    }


    public void actionPerformed(ActionEvent e) {
        for (RBlock selectedBlock : selectedBlocks) {
            selectedBlock.reset();
        }
    }
}
